@import '../../../styles-var/devui-var.scss';

.#{$devui-prefix}-gantt-scale-wrapper {
  display: block;
  height: 36px;
  line-height: 18px;
}

.#{$devui-prefix}-gantt-scale {
  display: inline-block;
  color: $devui-placeholder; // TODO: Color-Question
  text-align: center;
  position: absolute;
  height: 36px;
  font-weight: normal;

  &.day {
    &:not(.milestone) {
      &:hover .#{$devui-prefix}-scale-start {
        display: none;
      }
    }

    &.milestone {
      background-image:
        linear-gradient(
          180deg,
          rgba(254, 204, 85, 0) 0%,
          rgba(62, 204, 166, 0.1) 100%
        );
    }
  }

  & .#{$devui-prefix}-scale-start {
    width: 100%;
    height: 18px;
    position: absolute;
    left: 1px;
    white-space: nowrap;

    &.milestone {
      color: $devui-success;
    }
  }

  & .#{$devui-prefix}-scale-unit {
    height: 18px;
    position: absolute;
    top: 18px;
    width: 100%;

    & .border-left {
      height: 18px;
      border-left: 1px solid $devui-list-item-selected-bg;
    }

    & .scale-highlight {
      position: absolute;
      height: 18px;
      border-radius: $devui-border-radius;
      background-color: $devui-brand;
      padding: 0 4px 0 4px;

      & div {
        color: $devui-base-bg;
        font-size: $devui-font-size;
        font-weight: normal;
      }
    }

    .today {
      background: rgba(255, 121, 14, 0.2);
      border-radius: $devui-border-radius;
      height: 16px;
    }
  }

  & .milestone-new {
    display: none;
    position: absolute;
    width: 18px;
    height: 18px;
    margin-left: 16px;
    border: 1px solid $devui-list-item-selected-bg; // TODO: Color-Question
    cursor: pointer;

    & div {
      line-height: 16px;
    }
  }

  &:not(.milestone) {
    &:hover .milestone-new.day {
      display: block;
    }
  }
}

.#{$devui-prefix}-mark-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 1;
  background: $devui-line;
  opacity: 0.5;

  &.today {
    opacity: 0.2;
    background: #ff790e;

    &.day {
      margin-left: 24px;
    }

    &.week {
      margin-left: 9px;
    }

    &.month {
      margin-left: 4px;
    }
  }

  &.milestone {
    opacity: 0.2;
    background: $devui-success;

    &.day {
      margin-left: 24px;
    }

    &.week {
      margin-left: 9px;
    }

    &.month {
      margin-left: 4px;
    }
  }
}

.#{$devui-prefix}-mark-stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  background:
    linear-gradient(
      45deg,
      rgba(202, 207, 216, 0.2) 0,
      rgba(202, 207, 216, 0.2) 10%,
      transparent 10%,
      transparent 50%,
      rgba(202, 207, 216, 0.2) 50%,
      rgba(202, 207, 216, 0.2) 60%,
      transparent 60%,
      transparent
    );
  background-size: 6px 6px;

  &.day {
    width: 100px;
  }

  &.week {
    width: 40px;
  }

  &.month {
    width: 20px;
  }
}
